package com.woniu.airent.dto;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class ArticleDto implements Serializable {
    private Integer articleId;

    private Integer userId;
    private UserDto userDto;

    private String articleTitle;

    private String articleContent;

    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    private Date articleTime;

    private Integer articleState;

    private Integer examine;

    private List<ReplyDto> replyDtos;

    @Override
    public String toString() {
        return "ArticleDto{" +
                "articleId=" + articleId +
                ", userId=" + userId +
                ", userDto=" + userDto +
                ", articleTitle='" + articleTitle + '\'' +
                ", articleContent='" + articleContent + '\'' +
                ", articleTime=" + articleTime +
                ", articleState=" + articleState +
                ", examine=" + examine +
                ", replyDtos=" + replyDtos +
                '}';
    }

    public List<ReplyDto> getReplyDtos() {
        return replyDtos;
    }

    public void setReplyDtos(List<ReplyDto> replyDtos) {
        this.replyDtos = replyDtos;
    }

    public UserDto getUserDto() {
        return userDto;
    }

    public void setUserDto(UserDto userDto) {
        this.userDto = userDto;
    }

    public Integer getArticleId() {
        return articleId;
    }

    public void setArticleId(Integer articleId) {
        this.articleId = articleId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getArticleTitle() {
        return articleTitle;
    }

    public void setArticleTitle(String articleTitle) {
        this.articleTitle = articleTitle == null ? null : articleTitle.trim();
    }

    public String getArticleContent() {
        return articleContent;
    }

    public void setArticleContent(String articleContent) {
        this.articleContent = articleContent == null ? null : articleContent.trim();
    }

    public Date getArticleTime() {
        return articleTime;
    }

    public void setArticleTime(Date articleTime) {
        this.articleTime = articleTime;
    }

    public Integer getArticleState() {
        return articleState;
    }

    public void setArticleState(Integer articleState) {
        this.articleState = articleState;
    }

    public Integer getExamine() {
        return examine;
    }

    public void setExamine(Integer examine) {
        this.examine = examine;
    }
}